home *** CD-ROM | disk | FTP | other *** search
/ MacHack 1997 / MacHack 1997.toast / Hacks / Hacks ’97 / Warrior’s Progress / source code / Source / Libraries / Fonts / IntegerFaceMetrics.cp < prev    next >
Encoding:
Text File  |  1997-06-28  |  498 b   |  27 lines  |  [TEXT/CWIE]

  1. // IntegerFaceMetrics.cp
  2.  
  3. #ifndef IntegerFaceMetrics_h
  4. #include "IntegerFaceMetrics.h"
  5. #endif
  6. #ifndef TemporaryPort_h
  7. #include "TemporaryPort.h"
  8. #endif
  9. #ifndef GrafPortObject_h
  10. #include "GrafPortObject.h"
  11. #endif
  12.  
  13. IntegerFaceMetrics::IntegerFaceMetrics( const Face& face )
  14.   {
  15.     TemporaryPort port;
  16.     port.Port().SetFace( face );
  17.     GetFontInfo( this );
  18.   }
  19.  
  20. const IntegerFaceMetrics& IntegerFaceMetrics::Current()
  21.   {
  22.     static IntegerFaceMetrics metrics;
  23.     GetFontInfo( &metrics );
  24.     return metrics;
  25.   }
  26.  
  27.